# coding=utf8

# Copyright 2018 JDCLOUD.COM
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# NOTE: This class is auto generated by the jdcloud code generator program.

from jdcloud_sdk.core.jdcloudrequest import JDCloudRequest


class QueryOperationLogRequest(JDCloudRequest):
    """
    获取操作日志列表
    """

    def __init__(self, parameters, header=None, version="v1"):
        super(QueryOperationLogRequest, self).__init__(
            '/regions/{regionId}/operationLog:query', 'POST', header, version)
        self.parameters = parameters


class QueryOperationLogParameters(object):

    def __init__(self,regionId, ):
        """
        :param regionId: 地域代码，取值范围参见[《各地域及可用区对照表》](../Enum-Definitions/Regions-AZ.md)
        """

        self.regionId = regionId
        self.supType = None
        self.type = None
        self.pin = None
        self.instanceId = None
        self.dbName = None
        self.startTime = None
        self.endTime = None
        self.pageNumber = None
        self.pageSize = None

    def setSupType(self, supType):
        """
        :param supType: (Optional) 操作类型
        """
        self.supType = supType

    def setType(self, type):
        """
        :param type: (Optional) 对应控制台功能
        """
        self.type = type

    def setPin(self, pin):
        """
        :param pin: (Optional) 操作人
        """
        self.pin = pin

    def setInstanceId(self, instanceId):
        """
        :param instanceId: (Optional) 实例id
        """
        self.instanceId = instanceId

    def setDbName(self, dbName):
        """
        :param dbName: (Optional) 数据库名称
        """
        self.dbName = dbName

    def setStartTime(self, startTime):
        """
        :param startTime: (Optional) 起始时间(UTC)
        """
        self.startTime = startTime

    def setEndTime(self, endTime):
        """
        :param endTime: (Optional) 结束时间(UTC)
        """
        self.endTime = endTime

    def setPageNumber(self, pageNumber):
        """
        :param pageNumber: (Optional) 显示数据的页码，取值范围：[1,∞)。pageNumber为Null时，返回所有数据页码；超过总页数时，无数据。
        """
        self.pageNumber = pageNumber

    def setPageSize(self, pageSize):
        """
        :param pageSize: (Optional) 每页显示的数据条数，用于查询列表的接口。
        """
        self.pageSize = pageSize

